package com.xbongbong.saas.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @description: 状态颜色枚举
 * @Author: lcx
 * @date: 2019-01-15 14:39
 */
@Getter
public enum StatusColorEnum {
    // 正常
    NORMAL("normal"),
    // 成功
    SUCCESS("success"),
    // 报警
    WARNING("warning"),
    // 危险
    DANGER("danger"),
    ;

    /**
     * 名称
     */
    private final String name;

    StatusColorEnum(String name) {
        this.name = name;
    }

    /**
     * 获取全部枚举
     *
     */
    public static List<StatusColorEnum> getAllEnum() {
        List<StatusColorEnum> list = new ArrayList<>();
        for (StatusColorEnum cache : values()) {
            list.add(cache);
        }
        return list;
    }
}
